/**
 * "Visual Paradigm: DO NOT MODIFY THIS FILE!"
 * 
 * This is an automatic generated file. It will be regenerated every time 
 * you generate persistence class.
 * 
 * Modifying its content may cause the program not work, or your work may lost.
 */

/**
 * Licensee: DuKe TeAm
 * License Type: Purchased
 */
package smartgrid;

import java.util.List;
import org.hibernate.criterion.DetachedCriteria;
import org.orm.PersistentSession;
import org.orm.criteria.*;

public class AnnotationDetachedCriteria extends AbstractORMDetachedCriteria {
	public final IntegerExpression ID;
	public final DateExpression date;
	public final StringExpression name;
	
	public AnnotationDetachedCriteria() {
		super(smartgrid.Annotation.class, smartgrid.AnnotationCriteria.class);
		ID = new IntegerExpression("ID", this.getDetachedCriteria());
		date = new DateExpression("date", this.getDetachedCriteria());
		name = new StringExpression("name", this.getDetachedCriteria());
	}
	
	public AnnotationDetachedCriteria(DetachedCriteria aDetachedCriteria) {
		super(aDetachedCriteria, smartgrid.AnnotationCriteria.class);
		ID = new IntegerExpression("ID", this.getDetachedCriteria());
		date = new DateExpression("date", this.getDetachedCriteria());
		name = new StringExpression("name", this.getDetachedCriteria());
	}
	
	public FaceBookAccountDetachedCriteria createFaceBookAccountCriteria() {
		return new FaceBookAccountDetachedCriteria(createCriteria("faceBookAccount"));
	}
	
	public ContractDetachedCriteria createContractCriteria() {
		return new ContractDetachedCriteria(createCriteria("contract"));
	}
	
	public Annotation uniqueAnnotation(PersistentSession session) {
		return (Annotation) super.createExecutableCriteria(session).uniqueResult();
	}
	
	public Annotation[] listAnnotation(PersistentSession session) {
		List list = super.createExecutableCriteria(session).list();
		return (Annotation[]) list.toArray(new Annotation[list.size()]);
	}
}

